package com.cr.admin.business.brand.service.imple;

import com.cr.admin.business.brand.dao.mapper.BrandMapper;
import com.cr.admin.business.brand.dao.repository.BrandRepository;
import com.cr.admin.business.brand.pojo.entity.Brand;
import com.cr.admin.business.brand.pojo.param.BrandAddParam;
import com.cr.admin.business.brand.pojo.param.BrandUpdateParam;
import com.cr.admin.business.brand.pojo.query.BrandQuery;
import com.cr.admin.business.brand.service.BrandService;
import com.cr.admin.business.topic.pojo.entity.Topic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandServiceImpl implements BrandService {
    @Autowired
    private BrandRepository brandRepository;

    @Override
    public List<Brand> list(BrandQuery brandQuery) {
        return brandRepository.selectList(brandQuery);
    }

    @Override
    public void insert(BrandAddParam brandAddParam) {
        brandRepository.insert(brandAddParam);
    }

    @Override
    public void updateById(BrandUpdateParam brandUpdateParam) {
        brandRepository.updateById(brandUpdateParam);
    }

    @Override
    public Brand selectById(Long id) {
        return brandRepository.selectById(id);
    }

    @Override
    public void deleteByIds(List<Long> ids) {
        brandRepository.deleteByIds(ids);
    }

}
